<template>
    <div class="IncreAse">
        <div style="margin: 20px;"></div>
        <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
            <el-form-item label="名称">
                <el-input v-model="formLabelAlign.name"></el-input>
            </el-form-item>
            <el-form-item label="活动形式">
                <el-input type="textarea" v-model="formLabelAlign.desc"></el-input>
            </el-form-item>
            <el-tree :data="data" show-checkbox node-key="id" :default-expanded-keys="[2, 3]" :default-checked-keys="[5]"
                :props="defaultProps">
            </el-tree>
        </el-form>
    </div>
</template>
<script>
import { rootPermissionList } from "@/api/index"
export default {
  name: 'IncreAse',
    data() {
        return {
            labelPosition: 'right',
            formLabelAlign: {
                name: '',
                region: '',
                type: ''
            },

            data: [{
                id: 1,
                label: '一级 1',
                children: [{
                    id: 4,
                    label: '二级 1-1',
                    children: [{
                        id: 9,
                        label: '三级 1-1-1'
                    }, {
                        id: 10,
                        label: '三级 1-1-2'
                    }]
                }]
            }
            
            ],
            defaultProps: {
                children: 'children',
                label: 'label'
            }
        };
    },
methods:{
    async rootPermissionLists(){
        let data=await rootPermissionList()
        console.log(data);
    }
}

}
</script>
<style scoped></style>